home *** CD-ROM | disk | FTP | other *** search
/ Ham Radio 2000 / Ham Radio 2000.iso / ham2000 / packet / terminal / top_152 / src152.exe / rar / TOPDIR.PAS < prev    next >
Pascal/Delphi Source File  |  1995-05-16  |  37KB  |  1,229 lines

  1. {┌─────────────────────────────────────────────────────────────────────────┐}
  2. {│                                                                         │}
  3. {│                              T. O. P.                                   │}
  4. {│                                                                         │}
  5. {│                        (T)he  (O)ther  (P)acket                         │}
  6. {│                                                                         │}
  7. {│ T O P D I R . P A S                                                     │}
  8. {│                                                                         │}
  9. {│                                                                         │}
  10. {│ Directory-Anzeige                                                       │}
  11. {└─────────────────────────────────────────────────────────────────────────┘}
  12.  
  13.  
  14. Function  GetBsFNr (Zeile : Str80) : Str20;
  15. Var   f      : File;
  16.       Hstr   : Array [0..3] of Byte;
  17.       Magic,
  18.       Result : Word;
  19. Begin
  20.   FillChar(Hstr,SizeOf(Hstr),0);
  21.   Assign(f,Zeile);
  22.   if ResetBin(f,1) = 0 then
  23.   begin
  24.     BlockRead(f,Hstr,SizeOf(Hstr),Result);
  25.     FiResult := CloseBin(f);
  26.     move(Hstr[0],Magic,SizeOf(Magic));
  27.     if Magic = $6569 then
  28.     begin
  29.       Zeile := SFillStr(3,'0',int_str(Hstr[3])) + '/' +
  30.                SFillStr(3,'0',int_str(Hstr[2]));
  31.     end else Zeile := '';
  32.   end else Zeile := '';
  33.   GetBsFNr := Zeile;
  34. End;
  35.  
  36.  
  37. Function  FAttr (Attr : Byte) : Str4;
  38. Var   Astr : String[4];
  39. Begin
  40.   Astr := ConstStr(Pkt,4);
  41.   if Attr and ReadOnly = ReadOnly then Astr[1] := 'r';
  42.   if Attr and Archive  = Archive  then Astr[2] := 'a';
  43.   if Attr and SysFile  = SysFile  then Astr[3] := 's';
  44.   if Attr and Hidden   = Hidden   then Astr[4] := 'h';
  45.   FAttr := Astr;
  46. End;
  47.  
  48.  
  49. Function  FDate (FT : LongInt) : Str8;
  50. Var    DT   : DateTime;
  51. Begin
  52.   UnpackTime(FT,DT);
  53.   FDate := SFillStr(2,'0',int_str(DT.Day)) + Pkt +
  54.            SFillStr(2,'0',int_str(DT.Month)) + Pkt +
  55.            SFillStr(2,'0',copy(int_str(DT.Year),3,2));
  56. End;
  57.  
  58.  
  59. Function  FTime (FT : LongInt) : Str5;
  60. Var    DT   : DateTime;
  61. Begin
  62.   UnpackTime(FT,DT);
  63.   FTime := SFillStr(2,'0',int_str(DT.Hour)) + DP +
  64.            SFillStr(2,'0',int_str(DT.Min));
  65. End;
  66.  
  67.  
  68. Procedure SortDir;
  69. Var   x,i,j  : Integer;
  70.       N      : Word;
  71.       Change : Boolean;
  72.       Hilf   : Dir_Typ;
  73. Begin
  74.   N := DirFiles;
  75.   if N > 1 then
  76.   begin
  77.     x := 1;
  78.     While x <= N do x := x * 3 + 1;
  79.     x := x div 3;
  80.     While x > 0 do
  81.     begin
  82.       i := x;
  83.       While i <= N do
  84.       begin
  85.         j := i - x;
  86.         Change := true;
  87.         While (j > 0) and Change do
  88.         begin
  89.           if Dir^[j].Name > Dir^[j+x].Name then
  90.           begin
  91.             Hilf := Dir^[j+x];
  92.             Dir^[j+x] := Dir^[j];
  93.             Dir^[j] := Hilf;
  94.             j := j - x;
  95.           end else Change := false;
  96.         end;
  97.         i := i + 1;
  98.       end;
  99.       x := x div 3;
  100.     end;
  101.   end;
  102.  
  103.   for i := 1 to DirFiles do if Dir^[i].Name[1] = ^A then
  104.   begin
  105.     delete(Dir^[i].Name,1,1);
  106.     if Dir^[i].Name[1] = B1 then Dir^[i].Name[1] := Pkt;
  107.   end;
  108. End;
  109.  
  110.  
  111. Procedure GetDirFiles (* Zeile : Str80; ax : Byte *);
  112. Var   srec : SearchRec;
  113. Begin
  114.   FillChar(Dir^,SizeOf(Dir^),0);
  115.   FindFirst(Zeile,AnyFile,srec);
  116.   While DosError = 0 do with srec do
  117.   begin
  118.     if Attr = $00 then Attr := NotFile;
  119.     if (Attr and VolumeID <> VolumeID) and
  120.        (((Attr and ReadOnly = ReadOnly) and (ax and ReadOnly = ReadOnly)) or
  121.         ((Attr and Hidden = Hidden)     and (ax and Hidden = Hidden)) or
  122.         ((Attr and SysFile = SysFile)   and (ax and SysFile = SysFile)) or
  123.         ((Attr and Archive = Archive)   and (ax and Archive = Archive)) or
  124.         ((Attr and NotFile = NotFile)   and (ax and NotFile = NotFile))) then
  125.     begin
  126.       inc(DirFiles);
  127.       Dir^[DirFiles].Name := EFillStr(9,Pkt,ParmStr(1,Pkt,Name)) +
  128.                              EFillStr(3,B1,ParmStr(2,Pkt,Name));
  129.       Dir^[DirFiles].Size := SFillStr(8,B1,int_str(Size));
  130.       Dir^[DirFiles].Art := 1;
  131.       DirSize := DirSize + Size;
  132.  
  133.       Dir^[DirFiles].Attr := FAttr(Attr);
  134.       Dir^[DirFiles].Date := FDate(Time);
  135.       Dir^[DirFiles].Time := FTime(Time);
  136.     end;
  137.     Findnext(srec);
  138.   end;
  139. End;
  140.  
  141.  
  142. Procedure GetDirec (Zeile : Str80);
  143. Var   srec : SearchRec;
  144. Begin
  145.   FindFirst(Zeile,Directory,srec);
  146.   While DosError = 0 do with srec do
  147.   begin
  148.     if (Name <> Pkt) and (Attr and Directory = Directory) then
  149.     begin
  150.       if Name = '..' then Name := B1 + Pkt
  151.                      else Name := EFillStr(9,Pkt,ParmStr(1,Pkt,Name)) +
  152.                                   EFillStr(3,B1,ParmStr(2,Pkt,Name));
  153.       inc(DirFiles);
  154.       Dir^[DirFiles].Name := EFillStr(13,B1,^A + Name);
  155.  
  156.       if Name = (B1 + Pkt) then
  157.       begin
  158.         Dir^[DirFiles].Size := UpDir;
  159.         Dir^[DirFiles].Art := 3;
  160.       end else
  161.       begin
  162.         Dir^[DirFiles].Size := SubDir;
  163.         Dir^[DirFiles].Art := 2;
  164.       end;
  165.  
  166.       Dir^[DirFiles].Attr := FAttr(Attr);
  167.       Dir^[DirFiles].Date := FDate(Time);
  168.       Dir^[DirFiles].Time := FTime(Time);
  169.     end;
  170.     Findnext(srec);
  171.   end;
  172. End;
  173.  
  174.  
  175. Function GetDirStr(Nr : Word; Sp : Byte) : Str80;
  176. Var      Hstr : String[80];
  177.          Lstr : String[2];
  178. Begin
  179.   if Sp = 1 then Lstr := B2
  180.             else Lstr := B1;
  181.   Hstr := Dir^[Nr].Name + B1 +  Dir^[Nr].Size;
  182.   if Sp = 1 then Hstr := Hstr + B2 + Dir^[Nr].Attr;
  183.   if Sp < 3 then Hstr := Hstr + B2 + Dir^[Nr].Date + Lstr + Dir^[Nr].Time;
  184.   GetDirStr := Hstr;
  185. End;
  186.  
  187.  
  188. Function MarkDirStr(Nr : Word; Sp : Byte) : Str80;
  189. Var   ch : Char;
  190. Begin
  191.   if Dir^[Nr].Mark then ch := '■'
  192.                    else ch := B1;
  193.   MarkDirStr := B1 + ch + GetDirStr(Nr,Sp);
  194. End;
  195.  
  196.  
  197. Procedure DirZeig (* Var Zeile : Str80; var Ch : char; QRet : Boolean *);
  198. Const  Bofs = 1;
  199. Var    X,yM,
  200.        Bpos,
  201.        Zmax   : Byte;
  202.        Dpos   : Integer;
  203.        w,w1,
  204.        AnzM,
  205.        Result : Word;
  206.        Flag,
  207.        Fertig : Boolean;
  208.        KC     : Sondertaste;
  209.        VC,
  210.        VA     : Char;
  211.        f      : Text;
  212.        Mstr,
  213.        Such,
  214.        Mask,
  215.        DrvFree,
  216.        MName  : String[12];
  217.        Hstr,
  218.        Sstr,
  219.        Pfad,
  220.        XPfad  : String[80];
  221.  
  222.  
  223.   Procedure CheckPfad;
  224.   Begin
  225.     Pfad := Zeile;
  226.     if Pfad[length(Pfad)] = DP then Pfad := Pfad + BS;
  227.     if Pfad[length(Pfad)] = BS then Pfad := Pfad + Joker;
  228.  
  229.     While Pfad[length(Pfad)] <> BS do
  230.     begin
  231.       Mask := Pfad[length(Pfad)] + Mask;
  232.       delete(Pfad,length(Pfad),1);
  233.     end;
  234.   End;
  235.  
  236.   Procedure DirPage(beg : Word);
  237.   Var      i : Byte;
  238.   Begin
  239.     for i := 1 to Zmax do WriteRam(1,i+Bofs,Attrib[2],1,EFillStr(80,B1,MarkDirStr(beg-1+i,1)));
  240.     WriteRam(1,maxZ-1,Attrib[5],1,EFillStr(80,B1,B1 +
  241.          int_str(DirFiles) + B1 + InfoZeile(141) + B1 +
  242.          FormByte(int_str(DirSize)) + B1 + Bytes + B1 + B2 +
  243.          InfoZeile(324) + B1 + DrvFree + B1 + Bytes));
  244.     WriteRam(1,maxZ,Attrib[5],1,EFillStr(80,B1,B1+InfoZeile(1)));
  245.   End;
  246.  
  247.   Procedure GetCursorLine;
  248.   Begin
  249.     WriteRam(1,Bpos+Bofs,Attrib[4],1,EFillStr(80,B1,MarkDirStr(Dpos,1)));
  250.   End;
  251.  
  252.   Function GetFName (Nstr : Str12) : Str12;
  253.   Var   Hstr : String[12];
  254.   Begin
  255.     if Nstr[1] <> Pkt then
  256.     begin
  257.       Hstr := copy(Nstr,1,8);
  258.       While pos(Pkt,Hstr) > 0 do delete(Hstr,pos(Pkt,Hstr),1);
  259.       Hstr := Hstr + copy(Nstr,9,4);
  260.       KillEndBlanks(Hstr);
  261.       While (length(Hstr) > 0) and (Hstr[length(Hstr)] = Pkt)
  262.          do delete(Hstr,length(Hstr),1);
  263.     end else Hstr := Nstr;
  264.     KillEndBlanks(Hstr);
  265.     GetFName := Hstr;
  266.   End;
  267.  
  268.   Procedure InitStart(Art : Byte; Bstr : Str12);
  269.   Var    w    : Word;
  270.          Flag : Boolean;
  271.          Vpos : Byte;
  272.   Begin
  273.     Vpos := Bpos;
  274.     yM := 1;
  275.     Bpos := 1;
  276.     Dpos := 1;
  277.     AnzM := 0;
  278.     DirFiles := 0;
  279.     DirSize := 0;
  280.     GetDirFiles(Pfad + Mask,ReadOnly + Hidden + SysFile + Archive + NotFile);
  281.     GetDirec(Pfad + Joker);
  282.     SortDir;
  283.     DrvFree := FreeStr(Pfad[1]);
  284.     if Art = 1 then DirPage(Dpos);
  285.  
  286.     if Art = 2 then
  287.     begin
  288.       w := 0;
  289.       Flag := false;
  290.       While (w < DirFiles) and not Flag do
  291.       begin
  292.         inc(w);
  293.         if Bstr = GetFName(Dir^[w].Name) then
  294.         begin
  295.           Flag := true;
  296.           Dpos := w;
  297.           Bpos := Vpos;
  298.           if (Dpos < Bpos) or (DirFiles <= Zmax) then Bpos := Dpos;
  299.           if ((DirFiles - Dpos + Bpos) < Zmax) and
  300.              (DirFiles > Zmax) and
  301.              (Dpos > Bpos) then Bpos := Zmax - (DirFiles - Dpos);
  302.         end;
  303.       end;
  304.       DirPage(Dpos - Bpos + 1);
  305.     end;
  306.   End;
  307.  
  308.   Procedure CursorDn;
  309.   Begin
  310.     if Dpos < DirFiles then
  311.     begin
  312.       inc(Dpos);
  313.       if Bpos < Zmax then inc(Bpos) else
  314.       begin
  315.         WriteAttr(1,yM+Bofs,80,Attrib[2],1);
  316.         Scroll(Up,1,1+Bofs,Zmax+Bofs);
  317.         WriteRam(1,Bpos+Bofs,Attrib[4],1,MarkDirStr(Dpos,1));
  318.       end;
  319.     end else Alarm;
  320.   End;
  321.  
  322.   Procedure WegDruecken;
  323.   Var  l    : LongInt;
  324.        KC   : Sondertaste;
  325.        VC   : Char;
  326.        Flag : Boolean;
  327.   Begin
  328.     TimeOut := 0;
  329.     l := TimerTick;
  330.     Flag := false;
  331.     Repeat
  332.       if l <> TimerTick then
  333.       begin
  334.         inc(TimeOut);
  335.         l := TimerTick;
  336.       end;
  337.       if _KeyPressed then
  338.       begin
  339.         _ReadKey(KC,VC);
  340.         Flag := KC = _Esc;
  341.       end;
  342.     Until Flag or (TimeOut > Dir_TimeOut);
  343.   End;
  344.  
  345.  
  346. Begin
  347.   Moni_Off(0);
  348.   DirScroll := true;
  349.   NowFenster := false;
  350.   Close_SaveFiles;
  351.   GetMem(Dir,SizeOf(Dir^));
  352.  
  353.   Such := '';
  354.   Mask := '';
  355.   CheckPfad;
  356.  
  357.   Zmax := maxZ - 3;
  358.   Fertig := false;
  359.   X := 1;
  360.  
  361.   InitStart(1,'');
  362.  
  363.   WriteAttr(1,Bpos+Bofs,80,Attrib[4],1);
  364.  
  365.   Repeat
  366.     InitCursor(X,Bpos+Bofs);
  367.  
  368.     WriteRam(1,1,Attrib[5],1,
  369.      EFillStr(67,B1,B1+ '[' + Mask + ']' + B1 + Pfad) + EFillStr(13,B1,Such));
  370.  
  371.     WriteRam(61,maxZ-1,Attrib[5],1,EFillStr(20,B1,InfoZeile(155) + B1 + int_str(AnzM)));
  372.  
  373.     _ReadKey(KC,VC);
  374.  
  375.     if KC <> _Andere then Such := '';
  376.  
  377.     case KC of
  378.       _Esc
  379.        : begin
  380.            Fertig := true;
  381.            ch := #27;
  382.          end;
  383.  
  384.       _Dn
  385.        : CursorDn;
  386.  
  387.       _Up
  388.        : if Dpos > 1 then
  389.          begin
  390.            dec(Dpos);
  391.            if Bpos > 1 then dec(Bpos) else
  392.            begin
  393.              WriteAttr(1,yM+Bofs,80,Attrib[2],1);
  394.              Scroll(Dn,1,1+Bofs,Zmax+Bofs);
  395.              WriteRam(1,Bpos+Bofs,Attrib[4],1,MarkDirStr(Dpos,1));
  396.            end;
  397.          end else Alarm;
  398.  
  399.       _PgDn
  400.        : if Dpos < DirFiles then
  401.          begin
  402.            if Dpos + Zmax - Bpos >= DirFiles then
  403.            begin
  404.              Dpos := DirFiles;
  405.              Bpos := Zmax;
  406.              if Bpos > DirFiles then Bpos := DirFiles;
  407.            end else
  408.            begin
  409.              Dpos := Dpos + Zmax - 1;
  410.              if Dpos + Zmax - 1 > DirFiles then Dpos := DirFiles - Zmax + Bpos;
  411.              DirPage(Dpos - Bpos + 1);
  412.            end;
  413.          end else Alarm;
  414.  
  415.       _PgUp
  416.        : if Dpos > 1 then
  417.          begin
  418.            if Dpos <= Bpos then
  419.            begin
  420.              Dpos := 1;
  421.              Bpos := 1;
  422.            end else
  423.            begin
  424.              Dpos := Dpos - Zmax + 1;
  425.              if Dpos - Zmax + 1 < 1 then Dpos := Bpos;
  426.              DirPage(Dpos - Bpos + 1);
  427.            end;
  428.          end else Alarm;
  429.  
  430.       _Home
  431.        : if Dpos > 1 then
  432.          begin
  433.            Dpos := 1;
  434.            Bpos := 1;
  435.            DirPage(1);
  436.          end else Alarm;
  437.  
  438.       _End
  439.        : if Dpos < DirFiles then
  440.          begin
  441.            Dpos := DirFiles;
  442.            Bpos := Zmax;
  443.            if Bpos > DirFiles then Bpos := DirFiles;
  444.            DirPage(Dpos - Bpos + 1);
  445.          end else Alarm;
  446.  
  447.       _CtrlHome
  448.        : begin
  449.            Pfad := copy(Pfad,1,3);
  450.            InitStart(1,'');
  451.          end;
  452.  
  453.       _Right
  454.        : if HardCur then
  455.          begin
  456.            if X < 80 then inc(X) else Alarm;
  457.          end else Alarm;
  458.  
  459.       _Left
  460.        : if HardCur then
  461.          begin
  462.            if X > 1 then dec(X) else Alarm;
  463.          end else Alarm;
  464.  
  465.       _CtrlPgUp,
  466.       _Ret
  467.        : begin
  468.            if KC = _CtrlPgUp then
  469.            begin
  470.              Bpos := 1;
  471.              Dpos := 1;
  472.            end;
  473.  
  474.            if (Dir^[Dpos].Art = 2) and (KC = _Ret) then
  475.            begin
  476.              Pfad := Pfad + GetFName(Dir^[Dpos].Name);
  477.              KillEndBlanks(Pfad);
  478.              Pfad := Pfad + BS;
  479.              InitStart(1,'');
  480.            end else
  481.            if Dir^[Dpos].Art = 3 then
  482.            begin
  483.              delete(Pfad,length(Pfad),1);
  484.              MName := '';
  485.              While Pfad[length(Pfad)] <> BS do
  486.              begin
  487.                MName := Pfad[length(Pfad)] + MName;
  488.                delete(Pfad,length(Pfad),1);
  489.              end;
  490.              Bpos := Zmax;
  491.              InitStart(2,MName);
  492.            end else if (KC = _Ret) and QRet then
  493.            begin
  494.              Zeile := Pfad + GetFName(Dir^[Dpos].Name);
  495.              Fertig := true;
  496.            end else Alarm;
  497.          end;
  498.  
  499.       _AltA
  500.        : begin
  501.            if AnzM > 0 then
  502.            begin
  503.              for w := 1 to DirFiles do
  504.               if Dir^[w].Mark then Dir^[w].Mark := false;
  505.              AnzM := 0;
  506.            end else
  507.            begin
  508.              for w := 1 to DirFiles do
  509.              begin
  510.                if Dir^[w].Art = 1 then
  511.                begin
  512.                  Dir^[w].Mark := true;
  513.                  inc(AnzM);
  514.                end;
  515.              end;
  516.            end;
  517.            DirPage(Dpos - Bpos + 1);
  518.          end;
  519.  
  520.       _AltB
  521.        : if show > 0 then
  522.          begin
  523.            Open_SaveFiles;
  524.            Alarm;
  525.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(159)));
  526.            _ReadKey(KC,VC);
  527.            if (KC = _Ret) or (UpCase(VC) in YesMenge) then
  528.            begin
  529.              if K[show]^.FileSend then FertigSenden(show);
  530.              if (AnzM > 0) then
  531.              begin
  532.                for w := 1 to DirFiles do if Dir^[w].Mark then
  533.                begin
  534.                  Hstr := Pfad + GetFName(Dir^[w].Name);
  535.                  WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2 + Hstr));
  536.                  BIN_TX_File_Sofort(show,Hstr);
  537.                  Dir^[w].Mark := false;
  538.                end;
  539.                WriteRam(1,Bpos+Bofs,Attrib[5],1,
  540.                 EFillStr(80,B1,B2+int_str(AnzM)+B1+InfoZeile(122)));
  541.                AnzM := 0;
  542.              end else
  543.              if Dir^[Dpos].Art = 1 then
  544.              begin
  545.                Hstr := Pfad + GetFName(Dir^[Dpos].Name);
  546.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+Hstr));
  547.                BIN_TX_File_Sofort(show,Hstr);
  548.                WegDruecken;
  549.              end else Alarm;
  550.              DirPage(Dpos - Bpos + 1);
  551.            end else GetCursorLine;
  552.            Close_SaveFiles;
  553.          end else Alarm;
  554.  
  555.       _AltC
  556.        : if (Dir^[Dpos].Art in [1,2]) or (AnzM > 0) then
  557.          begin
  558.            Mstr := GetFName(Dir^[Dpos].Name);
  559.            Hstr := '';
  560.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(231)));
  561.            GetString(Hstr,Attrib[5],60,length(InfoZeile(231))+4,Bpos+Bofs,KC,1,Ins);
  562.            if KC <> _Esc then
  563.            begin
  564.              if pos(DP,Hstr) = 0 then Hstr := Pfad + Hstr;
  565.              if AnzM > 0 then
  566.              begin
  567.                XPfad := Hstr;
  568.                Result := 0;
  569.                for w := 1 to DirFiles do if Dir^[w].Mark then
  570.                begin
  571.                  Hstr := Pfad + GetFName(Dir^[w].Name) + B1 + XPfad;
  572.                  FileKopieren(Hstr);
  573.                  if str_int(CutStr(Hstr)) = 1 then
  574.                  begin
  575.                    Dir^[w].Mark := false;
  576.                    dec(AnzM);
  577.                    inc(Result);
  578.                  end;
  579.                end;
  580.                if AnzM > 0 then Alarm;
  581.                WriteRam(1,Bpos+Bofs,Attrib[5],1,
  582.                   EFillStr(80,B1,B2+int_str(Result) + B1 + InfoZeile(315)));
  583.                WegDruecken;
  584.                DirPage(Dpos - Bpos + 1);
  585.              end else
  586.              begin
  587.                if Dir^[Dpos].Art = 2
  588.                 then Hstr := Pfad + GetFName(Dir^[Dpos].Name) + BS + Joker + B1 + Hstr
  589.                 else Hstr := Pfad + GetFName(Dir^[Dpos].Name) + B1 + Hstr;
  590.                FileKopieren(Hstr);
  591.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2 + Hstr));
  592.                WegDruecken;
  593.              end;
  594.              InitStart(2,Mstr);
  595.            end else GetCursorLine;
  596.          end else Alarm;
  597.  
  598.       _AltD
  599.        : if AnzM > 0 then
  600.          begin
  601.            Alarm;
  602.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(319)));
  603.            _ReadKey(KC,VC);
  604.            if (KC = _Ret) or (UpCase(VC) in YesMenge) then
  605.            begin
  606.              for w := 1 to DirFiles do if Dir^[w].Mark then
  607.              begin
  608.                Assign(f,Pfad + GetFName(Dir^[w].Name));
  609.                SetFAttr(f,$20);
  610.                Result := EraseTxt(f);
  611.              end;
  612.              InitStart(1,'');
  613.            end else GetCursorLine;
  614.          end else
  615.          begin
  616.            Result := 255;
  617.            if Dir^[Dpos].Art = 2 then
  618.            begin
  619.              Alarm;
  620.              WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(327)));
  621.              _ReadKey(KC,VC);
  622.              if (KC = _Ret) or (UpCase(VC) in YesMenge) then
  623.              begin
  624.                Hstr := Pfad + GetFName(Dir^[Dpos].Name);
  625.                DelAll(Hstr,Bpos+Bofs);
  626.                if not PfadOk(0,Hstr) then Result := 0;
  627.              end else
  628.              begin
  629.                Result := 1;
  630.                GetCursorLine;
  631.              end;
  632.            end else
  633.  
  634.            if Dir^[Dpos].Art in [1,2] then
  635.            begin
  636.              Assign(f,Pfad + GetFName(Dir^[Dpos].Name));
  637.              GetFAttr(f,w);
  638.              w := w and $07;
  639.              if (w > 0) or SiDel then
  640.              begin
  641.                Alarm;
  642.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(235)));
  643.                _ReadKey(KC,VC);
  644.                if (KC = _Ret) or (UpCase(VC) in YesMenge) then w := 0 else
  645.                begin
  646.                  w := 1;
  647.                  Result := 1;
  648.                  GetCursorLine;
  649.                end;
  650.              end;
  651.  
  652.              if w = 0 then
  653.              begin
  654.                SetFAttr(f,$20);
  655.                if EraseTxt(f) = 0 then
  656.                begin
  657.                  Result := 0;
  658.                  DirSize := DirSize - str_int(Dir^[Dpos].Size);
  659.                  DrvFree := FreeStr(Pfad[1]);
  660.                end;
  661.              end;
  662.            end else Alarm;
  663.  
  664.            if Result = 0 then
  665.            begin
  666.              for w := Dpos to DirFiles-1 do Dir^[w] := Dir^[w+1];
  667.              FillChar(Dir^[DirFiles],SizeOf(Dir^[DirFiles]),0);
  668.              dec(DirFiles);
  669.  
  670.              if Dpos > DirFiles then
  671.              begin
  672.                if Dpos > 1 then dec(Dpos);
  673.                if Bpos > 1 then dec(Bpos);
  674.              end;
  675.              if ((DirFiles - Dpos + Bpos) < Zmax) and (Dpos > Bpos) then inc(Bpos);
  676.  
  677.              DirPage(Dpos - Bpos + 1);
  678.            end else if Result = 255 then Alarm;
  679.          end;
  680.  
  681.       _AltE
  682.        : if Dir^[Dpos].Art = 1 then
  683.          begin
  684.            Mstr := GetFName(Dir^[Dpos].Name);
  685.            ExecDOS(G^.Ext_Edi_Path + B1 + Pfad + Mstr);
  686.            InitStart(2,Mstr);
  687.          end else Alarm;
  688.  
  689.       _AltF
  690.        : begin
  691.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(54)));
  692.            _ReadKey(KC,VC);
  693.            if (KC = _Ret) or (UpCase(VC) in YesMenge) then
  694.            begin
  695.              K[show]^.WishBuf := true;
  696.              S_PAC(show,NU,false,M1 + B1 + LRK + Mask + RRK + B1 + Pfad + M1);
  697.              S_PAC(show,NU,false,B1 + ConstStr('=',44) + M1);
  698.              if AnzM > 0 then w1 := 1
  699.                          else w1 := Dpos;
  700.              for w := w1 to DirFiles do
  701.              begin
  702.                if AnzM > 0 then
  703.                begin
  704.                  if Dir^[w].Mark then S_PAC(show,NU,false,B1 + GetDirStr(w,1) + M1);
  705.                end else S_PAC(show,NU,false,B1 + GetDirStr(w,1) + M1);
  706.              end;
  707.              if AnzM > 0 then w := AnzM
  708.                          else w := Word(DirFiles-Dpos+1);
  709.              S_PAC(show,NU,false,B1 + ConstStr('-',44) + M1);
  710.              S_PAC(show,NU,true,B1 + int_str(w) + B1 + Files + M2);
  711.            end;
  712.            GetCursorLine;
  713.          end;
  714.  
  715.       _AltH
  716.        : TOP_Help(G^.OHelp[20]);
  717.  
  718.       _AltI
  719.        : begin
  720.            AnzM := 0;
  721.            for w := 1 to DirFiles do
  722.            begin
  723.              if Dir^[w].Art = 1 then
  724.              begin
  725.                Dir^[w].Mark := not Dir^[w].Mark;
  726.                if Dir^[w].Mark then inc(AnzM);
  727.              end;
  728.            end;
  729.            DirPage(Dpos - Bpos + 1);
  730.          end;
  731.  
  732.       _AltM
  733.        : begin
  734.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(326)));
  735.            GetString(Mask,Attrib[5],12,length(InfoZeile(326))+4,Bpos+Bofs,KC,3,Ins);
  736.            if KC <> _Esc then
  737.            begin
  738.              if Mask = '' then Mask := Joker;
  739.              InitStart(1,'');
  740.            end else GetCursorLine;
  741.          end;
  742.  
  743.       _AltN
  744.        : begin
  745.            Hstr := '';
  746.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(184)));
  747.            GetString(Hstr,Attrib[5],12,length(InfoZeile(184))+4,Bpos+Bofs,KC,3,Ins);
  748.            if KC <> _Esc then
  749.            begin
  750.              Mstr := Hstr;
  751.              if pos(BS,Hstr) = 0 then Hstr := Pfad + Hstr;
  752.              if MkSub(Hstr) then InitStart(2,Mstr) else
  753.              begin
  754.                Alarm;
  755.                GetCursorLine;
  756.              end;
  757.            end else GetCursorLine;
  758.          end;
  759.  
  760.       _AltO
  761.        : begin
  762.            Mstr := GetFName(Dir^[Dpos].Name);
  763.            GetDir(0,Hstr);
  764.            XPfad := Pfad;
  765.            if length(XPfad) > 3 then delete(XPfad,length(XPfad),1);
  766.            (*$I-*) ChDir(XPfad); (*$I+*)
  767.            Result := IOResult;
  768.  
  769.            ExecDOS('');
  770.  
  771.            (*$I-*) ChDir(Hstr); (*$I+*)
  772.            Result := IOResult;
  773.  
  774.            Flag := false;
  775.            Repeat
  776.              if not PfadOk(0,Pfad) then
  777.              begin
  778.                delete(Pfad,length(Pfad),1);
  779.                While (length(Pfad) > 3) and (Pfad[length(Pfad)] <> BS)
  780.                   do delete(Pfad,length(Pfad),1);
  781.              end else Flag := true;
  782.            Until Flag or (length(Pfad) <= 3);
  783.            InitStart(2,Mstr);
  784.          end;
  785.  
  786.       _AltL,
  787.       _AltP
  788.        : begin
  789.            if KC = _AltL then Hstr := ''
  790.                          else Hstr := Pfad;
  791.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(257)));
  792.            GetString(Hstr,Attrib[5],60,length(InfoZeile(257))+4,Bpos+Bofs,KC,1,Ins);
  793.            if KC <> _Esc then
  794.            begin
  795.              if length(Hstr) = 1 then Hstr := Hstr + DP;
  796.              if Hstr[length(Hstr)] <> BS then Hstr := Hstr + BS;
  797.              if PfadOk(0,Hstr) then
  798.              begin
  799.                Zeile := Hstr;
  800.                Such := '';
  801.                Mask := '';
  802.                CheckPfad;
  803.                InitStart(1,'');
  804.              end else
  805.              begin
  806.                WriteRam(1,Bofs+Bpos,Attrib[4],1,
  807.                 EFillStr(80,B1,B2 + InfoZeile(75) + DP + B2 + Hstr));
  808.                Alarm;
  809.                WegDruecken;
  810.                GetCursorLine;
  811.              end;
  812.            end else GetCursorLine;
  813.          end;
  814.  
  815.       _AltR
  816.        : if Dir^[Dpos].Art in [1,2] then
  817.          begin
  818.            Hstr := GetFName(Dir^[Dpos].Name);
  819.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(4)));
  820.            GetString(Hstr,Attrib[5],12,length(InfoZeile(4))+4,Bpos+Bofs,KC,0,Ins);
  821.            if KC <> _Esc then
  822.            begin
  823.              Assign(f,Pfad + GetFName(Dir^[Dpos].Name));
  824.              (*$I-*) Rename(f,Pfad + Hstr);  (*$I+*)
  825.              if IOResult = 0 then
  826.              begin
  827.                Hstr := EFillStr(9,Pkt,ParmStr(1,Pkt,Hstr)) +
  828.                        EFillStr(3,B1,ParmStr(2,Pkt,Hstr));
  829.                Dir^[Dpos].Name := Hstr;
  830.              end else Alarm;
  831.            end;
  832.            GetCursorLine;
  833.          end else Alarm;
  834.  
  835.       _AltS
  836.        : begin
  837.            WriteRam(1,Bofs+Bpos,Attrib[4],1,EFillStr(80,B1,B1+InfoZeile(142)));
  838.            XPfad := Pfad;
  839.            dec(XPfad[0]);
  840.            While pos(BS,XPfad) > 0 do delete(XPfad,1,pos(BS,XPfad));
  841.            While pos(DP,XPfad) > 0 do delete(XPfad,pos(DP,XPfad),1);
  842.            XPfad := G^.SavePfad + XPfad + Pkt + 'DIR';
  843.            GetString(XPfad,Attrib[4],60,9,Bofs+Bpos,KC,0,Ins);
  844.            if KC <> _Esc then
  845.            begin
  846.              Assign(f,XPfad);
  847.              Result := AppendTxt(f);
  848.              if Result <> 0 then Result := RewriteTxt(f);
  849.              if Result = 0 then
  850.              begin
  851.                Writeln(f,B1 + '[' + Mask + ']' + B1 + Pfad);
  852.                Writeln(f,B1 + ConstStr('=',44));
  853.                if AnzM > 0 then w1 := 1
  854.                            else w1 := Dpos;
  855.                for w := w1 to DirFiles do
  856.                begin
  857.                  if AnzM > 0 then
  858.                  begin
  859.                    if Dir^[w].Mark then Writeln(f,B1 + GetDirStr(w,1));
  860.                  end else Writeln(f,B1 + GetDirStr(w,1));
  861.                end;
  862.                if AnzM > 0 then w := AnzM
  863.                            else w := Word(DirFiles-Dpos+1);
  864.                Writeln(f,B1 + ConstStr('-',44));
  865.                Writeln(f,B1 + int_str(w) + B1 + Files);
  866.                Writeln(f);
  867.                FiResult := CloseTxt(f);
  868.                InitStart(2,'');
  869.              end else
  870.              begin
  871.                WriteRam(1,Bofs+Bpos,Attrib[4],1,
  872.                 EFillStr(80,B1,B2 + InfoZeile(75) + DP + B2 + XPFad));
  873.                Alarm;
  874.                WegDruecken;
  875.              end;
  876.            end;
  877.            GetCursorLine;
  878.          end;
  879.  
  880.       _AltT
  881.        : if show > 0 then
  882.          begin
  883.            Open_SaveFiles;
  884.            Alarm;
  885.            WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+InfoZeile(159)));
  886.            _ReadKey(KC,VC);
  887.            if (KC = _Ret) or (UpCase(VC) in YesMenge) then
  888.            begin
  889.              if K[show]^.FileSend then FertigSenden(show);
  890.              if (AnzM > 0) then
  891.              begin
  892.                for w := 1 to DirFiles do if Dir^[w].Mark then
  893.                begin
  894.                  Hstr := Pfad + GetFName(Dir^[w].Name);
  895.                  WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2 + Hstr));
  896.                  TXT_TX_File_Sofort(show,Hstr);
  897.                  Dir^[w].Mark := false;
  898.                end;
  899.                WriteRam(1,Bpos+Bofs,Attrib[5],1,
  900.                 EFillStr(80,B1,B2+int_str(AnzM)+B1+InfoZeile(122)));
  901.                WegDruecken;
  902.                AnzM := 0;
  903.              end else
  904.              if Dir^[Dpos].Art = 1 then
  905.              begin
  906.                Hstr := Pfad + GetFName(Dir^[Dpos].Name);
  907.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2+Hstr));
  908.                TXT_TX_File_Sofort(show,Hstr);
  909.                WegDruecken;
  910.              end else Alarm;
  911.              DirPage(Dpos - Bpos + 1);
  912.            end else GetCursorLine;
  913.            Close_SaveFiles;
  914.          end else Alarm;
  915.  
  916.       _AltV
  917.        : if Dir^[Dpos].Art = 1 then
  918.          begin
  919.            Mstr := GetFName(Dir^[Dpos].Name);
  920.            ExecDOS(G^.Ext_View_Path + B1 + Pfad + Mstr);
  921.            InitStart(2,Mstr);
  922.          end else Alarm;
  923.  
  924.       _Alt7,
  925.       _AltW
  926.        : if (show > 0) and (AnzM > 0) then
  927.          begin
  928.            VA := Key[KC].Ze;
  929.            Open_SaveFiles;
  930.            Sstr := '';
  931.            WriteRam(1,Bpos+Bofs,Attrib[5],1,ConstStr(B1,80));
  932.            GetString(Sstr,Attrib[5],60,2,Bpos+Bofs,KC,0,Ins);
  933.            if (KC = _Ret) and (Sstr > '') then
  934.            begin
  935.              if K[show]^.FileSend then FertigSenden(show);
  936.              K[show]^.WishBuf := true;
  937.              for w := 1 to DirFiles do if Dir^[w].Mark then
  938.              begin
  939.                if VA = Key[_Alt7].Ze then
  940.                begin
  941.                  Hstr := Get7PlFNr(Pfad + GetFName(Dir^[w].Name));
  942.                  if Hstr > '' then Hstr := B1 + Hstr;
  943.                end else Hstr := '';
  944.                S_PAC(show,NU,false,Sstr + B1 + GetFName(Dir^[w].Name)+Hstr+M1);
  945.                Hstr := Pfad + GetFName(Dir^[w].Name);
  946.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2 + Hstr));
  947.                TXT_TX_File_Sofort(show,Hstr);
  948.                Dir^[w].Mark := false;
  949.                if not K[show]^.TxLRet then S_PAC(show,NU,false,M1);
  950.                S_PAC(show,NU,true,^Z + M1);
  951.              end;
  952.              WriteRam(1,Bpos+Bofs,Attrib[5],1,
  953.               EFillStr(80,B1,B2+int_str(AnzM)+B1+InfoZeile(122)));
  954.              WegDruecken;
  955.              AnzM := 0;
  956.              DirPage(Dpos - Bpos + 1);
  957.            end else GetCursorLine;
  958.            Close_SaveFiles;
  959.          end else Alarm;
  960.  
  961.       _Alt6,
  962.       _AltZ
  963.        : if (show > 0) and (AnzM > 0) then
  964.          begin
  965.            VA := Key[KC].Ze;
  966.            Open_SaveFiles;
  967.            Sstr := '';
  968.            WriteRam(1,Bpos+Bofs,Attrib[5],1,ConstStr(B1,80));
  969.            GetString(Sstr,Attrib[5],60,2,Bpos+Bofs,KC,0,Ins);
  970.            if (KC = _Ret) and (Sstr > '') then
  971.            begin
  972.              if K[show]^.FileSend then FertigSenden(show);
  973.              K[show]^.WishBuf := true;
  974.              for w := 1 to DirFiles do if Dir^[w].Mark then
  975.              begin
  976.                if VA = Key[_Alt6].Ze then
  977.                begin
  978.                  Hstr := GetBsFNr(Pfad + GetFName(Dir^[w].Name));
  979.                  if Hstr > '' then Hstr := B1 + Hstr;
  980.                end else Hstr := '';
  981.                S_PAC(show,NU,true,Sstr + B1 + GetFName(Dir^[w].Name)+Hstr+M1);
  982.                Hstr := Pfad + GetFName(Dir^[w].Name);
  983.                WriteRam(1,Bpos+Bofs,Attrib[5],1,EFillStr(80,B1,B2 + Hstr));
  984.                BIN_TX_File_Sofort(show,Hstr);
  985.                Dir^[w].Mark := false;
  986.              end;
  987.              WriteRam(1,Bpos+Bofs,Attrib[5],1,
  988.               EFillStr(80,B1,B2+int_str(AnzM)+B1+InfoZeile(122)));
  989.              WegDruecken;
  990.              AnzM := 0;
  991.              DirPage(Dpos - Bpos + 1);
  992.            end else GetCursorLine;
  993.            Close_SaveFiles;
  994.          end else Alarm;
  995.  
  996.       _Andere
  997.        : begin
  998.            if VC = B1 then
  999.            begin
  1000.              if Dir^[Dpos].Art = 1 then
  1001.              begin
  1002.                Dir^[Dpos].Mark := not Dir^[Dpos].Mark;
  1003.                if Dir^[Dpos].Mark then inc(AnzM)
  1004.                                   else dec(AnzM);
  1005.                GetCursorLine;
  1006.                CursorDn;
  1007.              end else Alarm;
  1008.            end else
  1009.  
  1010.            begin
  1011.              Such := Such + UpCase(VC);
  1012.              w := 0;
  1013.              Flag := false;
  1014.              While (w < DirFiles) and not Flag do
  1015.              begin
  1016.                inc(w);
  1017.                if pos(Such,GetFName(Dir^[w].Name)) = 1 then
  1018.                begin
  1019.                  Flag := true;
  1020.                  Dpos := w;
  1021.                  if (Dpos < Bpos) or (DirFiles <= Zmax) then Bpos := Dpos;
  1022.                  if ((DirFiles - Dpos + Bpos) < Zmax) and
  1023.                     (DirFiles > Zmax) and
  1024.                     (Dpos > Bpos) then Bpos := Zmax - (DirFiles - Dpos);
  1025.                end;
  1026.              end;
  1027.  
  1028.              if not Flag then
  1029.              begin
  1030.                Alarm;
  1031.                Such := '';
  1032.              end else DirPage(Dpos - Bpos + 1);
  1033.            end;
  1034.          end;
  1035.  
  1036.       else Alarm;
  1037.     end;
  1038.  
  1039.     WriteAttr(1,yM+Bofs,80,Attrib[2],1);
  1040.     WriteAttr(1,Bpos+Bofs,80,Attrib[4],1);
  1041.     yM := Bpos;
  1042.   Until Fertig;
  1043.  
  1044.   FreeMem(Dir,SizeOf(Dir^));
  1045.  
  1046.   Open_SaveFiles;
  1047.   DirScroll := false;
  1048.   Moni_On;
  1049. End;
  1050.  
  1051.  
  1052. Procedure RemoteDir (* Kanal : Byte; Zeile : Str80 *);
  1053. Type    FeldPtr = array[1..maxDirRem] of String[43];
  1054.  
  1055. Var     SpAnz    : Byte;
  1056.         i,i1,ax  : Word;
  1057.         Free     : LongInt;
  1058.         Bstr     : String[80];
  1059.         Path     : String[80];
  1060.         Fstr     : String[5];
  1061.         ch       : Char;
  1062.  
  1063. Begin
  1064.   Close_SaveFiles;
  1065.   Open_SaveFiles;
  1066.  
  1067.   GetMem(Dir,SizeOf(Dir^));
  1068.   SpAnz := 1;
  1069.  
  1070.   KillendBlanks(Zeile);
  1071.   Bstr := RestStr(Zeile);
  1072.  
  1073.   ax := ReadOnly + Archive + NotFile + Hidden + SysFile + Directory;
  1074.  
  1075.   if pos(Sst,Bstr) > 0 then
  1076.   begin
  1077.     While pos(Sst,Bstr) > 0 do
  1078.     begin
  1079.       i := pos(Sst,Bstr);
  1080.       if (i > 0) and (i+1 >= length(Bstr)) then
  1081.       begin
  1082.         case Bstr[i+1] of
  1083.           'F' : ax := ReadOnly + Archive + Hidden + SysFile + NotFile;
  1084.           'D' : ax := Directory;
  1085.           'S' : ax := SysFile;
  1086.           'H' : ax := Hidden;
  1087.           'R' : ax := ReadOnly;
  1088.           'A' : ax := Archive;
  1089.           'N' : ax := NotFile;
  1090.           '1',
  1091.           '2',
  1092.           '3' : SpAnz := str_int(Bstr[i+1]);
  1093.         end;
  1094.         delete(Bstr,i,2);
  1095.       end else delete(Bstr,i,1);
  1096.     end;
  1097.   end;
  1098.  
  1099.   Path := CutStr(Zeile);
  1100.   if Path[length(Path)] = BS then Path := Path + Joker else
  1101.   begin
  1102.     if PfadOk(0,Path) then Path := Path + BS + Joker;
  1103.   end;
  1104.  
  1105.   Fstr := ConstStr(B1,5);
  1106.  
  1107.   case SpAnz of
  1108.     1  : i := 40;
  1109.     2  : i := 80;
  1110.     3  : i := 70;
  1111.   end;
  1112.  
  1113.   Bstr := InfoZeile(169);
  1114.   S_PAC(Kanal,NU,false,M1 + ConstStr(B1,(i-length(Bstr)) div 2) + Bstr + M1);
  1115.   S_PAC(Kanal,NU,false,ConstStr(B1,(i-length(Bstr)) div 2) + ConstStr(GL,length(Bstr)) + M1);
  1116.  
  1117.   DirFiles := 0;
  1118.   DirSize := 0;
  1119.   GetDirFiles(Path,ax);
  1120.   if ax and Directory = Directory then
  1121.   begin
  1122.     Bstr := Path;
  1123.     While (length(Bstr) > 0) and (Bstr[length(Bstr)] <> BS)
  1124.        do delete(Bstr,length(Bstr),1);
  1125.     Bstr := Bstr + Joker;
  1126.     GetDirec(Bstr);
  1127.   end;
  1128.   SortDir;
  1129.  
  1130.   if DirFiles > 0 then
  1131.   begin
  1132.     Bstr := '';
  1133.     for i := 1 to DirFiles do
  1134.     begin
  1135.       if i mod SpAnz = 0
  1136.         then S_PAC(Kanal,NU,false,GetDirStr(i,SpAnz) + M1)
  1137.         else S_PAC(Kanal,NU,false,GetDirStr(i,SpAnz) + B2 + B2);
  1138.     end;
  1139.     if not K[Kanal]^.TxLRet then S_PAC(Kanal,NU,false,M1);
  1140.   end;
  1141.   S_PAC(Kanal,NU,false,M1 + InfoZeile(142) + B1 + Path + M1 +
  1142.                            int_str(DirFiles) + B1 + InfoZeile(141) + B1 +
  1143.                            FormByte(int_str(DirSize)) + B1 + Bytes + B3 +
  1144.                            InfoZeile(324) + B1 +
  1145.                            FreeStr(Path[1]) + B1 + Bytes + M1);
  1146.   FreeMem(Dir,SizeOf(Dir^));
  1147. End;
  1148.  
  1149.  
  1150. Procedure DelAll (* Pfad : Str80; Yp : Byte *);
  1151. Var  srec    : SearchRec;
  1152.      Vstr,
  1153.      Dstr    : String[80];
  1154.      Fl,Flag,
  1155.      NewVerz : Boolean;
  1156.      f       : Text;
  1157.      Result  : Word;
  1158. Begin
  1159.   Flag := false;
  1160.   NewVerz := true;
  1161.   Dstr := Pfad;
  1162.   GetDir(0,Vstr);
  1163.   (*$I-*) ChDir(copy(Pfad,1,3)); (*$I+*)
  1164.   Result := IOResult;
  1165.  
  1166.   While not Flag and not _KeyPressed do with srec do
  1167.   begin
  1168.     if NewVerz then FindFirst(Pfad + BS + Joker,AnyFile,srec);
  1169.     NewVerz := false;
  1170.  
  1171.     if DosError = 0 then
  1172.     begin
  1173.       if Attr and Directory = Directory then
  1174.       begin
  1175.         if pos(Pkt,Name) <> 1 then
  1176.         begin
  1177.           Pfad := Pfad + BS + Name;
  1178.           NewVerz := true;
  1179.         end;
  1180.       end else
  1181.       begin
  1182.         Assign(f,Pfad + BS + Name);
  1183.         (*$I-*) SetFAttr(f,$20); (*$I+*)
  1184.         Result := IOResult;
  1185.         Result := EraseTxt(f);
  1186.         if (Result = 0) and (Yp > 0) then
  1187.           WriteRam(1,Yp,Attrib[5],1,EFillStr(80,B1,B2 + Pfad + BS + Name));
  1188.       end;
  1189.     end else
  1190.     begin
  1191.       Fl := false;
  1192.       (*$I-*) RmDir(Pfad); (*$I+*)
  1193.       Result := IOResult;
  1194.       if (Result = 0) and (Yp > 0) then
  1195.           WriteRam(1,Yp,Attrib[5],1,EFillStr(80,B1,B2 + Pfad));
  1196.       While (length(Pfad) > length(Dstr)) and (Pfad[length(Pfad)] <> BS) do
  1197.       begin
  1198.         delete(Pfad,length(Pfad),1);
  1199.         Fl := true;
  1200.       end;
  1201.       Flag := Dstr = Pfad;
  1202.       if Fl then delete(Pfad,length(Pfad),1);
  1203.       NewVerz := true;
  1204.     end;
  1205.  
  1206.     if not NewVerz then FindNext(srec);
  1207.   end;
  1208.   (*$I-*) ChDir(Vstr); (*$I+*)
  1209.   Result := IOResult;
  1210. End;
  1211.  
  1212.  
  1213. Function  Get7PlFNr (* Zeile : Str80 : Str20 *);
  1214. Begin
  1215.   Assign(G^.TFile,Zeile);
  1216.   if ResetTxt(G^.TFile) = 0 then
  1217.   begin
  1218.     Readln(G^.TFile,Zeile);
  1219.     FiResult := CloseTxt(G^.TFile);
  1220.     if (UpCaseStr(copy(Zeile,1,8)) = Meldung[11]) and
  1221.        (str_int(ParmStr(2,B1,Zeile)) > 0) and
  1222.        (str_int(ParmStr(4,B1,Zeile)) > 0) then
  1223.     begin
  1224.       Zeile := ParmStr(2,B1,Zeile) + '/' + ParmStr(4,B1,Zeile);
  1225.     end else Zeile := '';
  1226.   end else Zeile := '';
  1227.   Get7PlFNr := Zeile;
  1228. End;
  1229.